Adds a new item into the cache using the specified region name. 


 
            
            
            
            
            
            
            
            public virtual bool Add<>( 
   string ,
    ,
   CacheItemPolicy ,
   string 
)
             
        
            
            'Declaration
 
Public Overloads Overridable Function Add(Of )( _
   ByVal  As String, _
   ByVal  As , _
   ByVal  As CacheItemPolicy, _
   ByVal  As String _
) As Boolean
             
        
            
            'Usage
 
Dim instance As ObjectCache
Dim key As String
Dim value As 
Dim policy As CacheItemPolicy
Dim regionName As String
Dim value As Boolean
 
value = instance.Add(Of T)(key, value, policy, regionName)
             
        
            
            
            
        
            
            public<T> boolean add(String key, T value, Class<?> classOfT, CacheItemPolicy policy, String regionName)
            
             
        
            
            public:
virtual bool Addgeneric<typename >
( 
   String^ ,
    ,
   CacheItemPolicy^ ,
   String^ 
) 
             
        
             
        
            Parameters
- key
 
- Unique identifier of the cache item.
 - value
 
- Data for the cache item.
 - policy
 
- Expiration policy to use
 - regionName
 
- Optional name of a region in cache.
 
            Type Parameters
- T
 
            Return Value
true if the item was added successfully, false if there is an item in the cache that has the same key.